Corrected a problem with type conversion