Got it to work

I found a couple of bugs that made the program not work and I fixed them