Fix bad string to number conversion