Removing erroneous chracters