Bug fix and convert to float