Change main loop.