Fixed undefined error.