Fix the level check