fix a bug in the double representation.