Fixed bug for getModelTree in purkinje