Fix issue with last level being skipped