Changed the level calculation logic.
Fixed a typo in the beforeValidate function of characters.