SetState module problem fixed, closes #843.