Fix parsing of strings, fixes #3543