Fix bug with explicit-state-passing