Fixing | characters in input string