fixed nesting in cons_ST_per, looks fine after a few minutes of testing