fix serializability of model