Fix broken exit() function

Issue #215