cleaned up error message autoreplacement