Fix pattern loading.