Fix timeout in handle_event