Fix broken exit() function