Fix: event handling moved to other thread