fix model serialization bug introduced by NMS-7231 changes