Various error/event bug fixes.