Fixed sigint so that it no longer loops infinitely