Fixed int to double bug