Fixed Null Pointer Exception with Level Checking