fixed notice warnings and added display errors 0