Fixed an assert on TestSerializeModel function