Fixed undefined variable warning.