bug fix in model registration