fix error hander