Fixed some regressions in retracts and wipe. Includes regression test