fix broken-ass behavior for add pattern