Fixes to get Test state to work