Working powerflow; switch state still problematic