Added a X error handler