Remove unsafe multi mainloop