fix type comparison