Bugfix

Moved vars to correct location.