fix exit on error