Added missing error handler