fix for remove, and replace, tests simplification