fixed conversion to double