Fix used variable before assignment