accelerate main loop by removing bug