fix switched vars

small fix
Merge pull request #25 from jpmeenagh/Johns-14-final-changes

fix switched vars