Fix a bug which leads to level up beyond top level