Changed exit() to be more portable...I guess