fixed bugs in character