fix issue where mode active for char not found, fix selecting text