fixed divide issue with floats