fixed a bug where float_to_decimal was being called on nonfloats