Fixed errors in serialization of pipeline