Fixed deploy task issue where variables where being declared to early.