Added ability to pass option into unstate.

Fixes #2068