Removing \n from string for precaution and avoid UndefinedMethod