Casting the wrong numbers to int