fixed bug for max level