Solved undefined variable.