fixing complex statemachines testcode