Saving state of correct variable. Fixes #5.