fix static calls in error handler