Fixed some stuff

Fixed a major bug that caused the program not to work