Fixed string to int bug