Removing invalid fields