Fix error in detection of double type.