fixed error handler signature