Use better mapping for clearing prev search