Multiple bugfixes with event handling