output fix

Output variable was in the wrong place