add protection to number parsing