pipeline stages' serialization tests and fixes