Fixed a main loop

fuck yeah