Patched bug with a couple lines of code. Still would like to know why it's happening. Other than that, just need to handle signals and am done with the program