fix Gui error handler