adds cleanup function for number values

fixes validation problems on the server