Revert "Revert "fixed float issues""

This reverts commit ea040852f0378bc47e1902430e395461285d6023.