Minor changes that make the program work