fixed release builds, bug #10 (holes in leveling logic)