Fix error when converting float number (in string) to integer by wrapping a float cast