Fixed a bug in character.py