Made it exit cleanly