bug fixes and level tracking