pregreplace warning fix