fixing pattern file