Fixing variables declaration to come before the use

It doesn't work on dotless if you use variables before they are declared