This may or may not happen. Is this happening for all the inputs?
if you can supply with a reproducible script, it might be helpful to debug. If not, the answers would be more of a  speculation than actual cause.