Added additional check to prevent multiple error handler items