Fix tests

Event delegation tests are still broken. Any ideas @paulmillr?