Solved problem with help from the Lord of Codes.