replacing the bad characters