Fixed some bugs in changing characters.