Fix bug with float not being cast to int