remove \n from two error messages