Fixed event dispatch race condition (issue #17)