small bug fix to detect next level