Fixed DB error handler.