Fixed undefined notices