Fix bug in conversion cast to double.