fixed bug in theory_spec