fix some bug while selecting the characters