fix two arg remove() and replace(...) methods while operating on
present but expired entries