Level switching logic getting fixed