Fixed undefined variable