Fixed state file bug.