fixed wrong var issue