Fix mainloop test.