alerts and error messages fixed