[] Move event handling to the main thread