fix after block so that residual objects not left in repository