Serialprint is different if written first to variable

Can you please give examples of the output "with zeroes in it" and output without zeroes in it ?

Do you mean leading zeroes and if so, do they matter when using the value in a numerical comparison ?