Corrected bug where floating point value was being cast to an int