Fix bug 628 - Better handling of model management