correct character comparison