fixing pattern repeat