fix exit on linux