Fixed undefined exceptions