Fixed coord calculation to pass arguments in correct order to onLevel.