Fix order of deletion used in tests