fixing parsing of # within a string