Fixed Infinite Loop in Select Next Character

Fixed logic in select next character.