tried to fix arbitrary characters at the end of the resturn string/pointer