Found the problem and fixed it. Program is now working.