Added patterns and fixed bug for reappearing patterns