fix exception on last level of stage
Merge pull request #762 from code-dot-org/fix_last_level_exception

fix exception on last level of stage