Bugfix

Assign a variable before referenced