use the correct string when creating a pattern