Fixed undefined exception.