Fixed bugs stopping STGP from being runnable