Made casting only happen for floats -> ints.