fixed bug on conversion from int to double