added compatibility with models with module/namespace