Fix bug prevent floats encoding to integers