Backport event binding fixes.