Fixed bugs #3655 and #4701: No wrappers for certain events (patch by Martin Kutschker)