Removal of membrane elements before washing