fix fenced patterns