fix get model from template instance