Unit conversion fixes

Mixing floats, doubles and integers is not good for project.