found my error i wasn't calling sys.init correctly so variables wheren't getting set up right