properly return dict in mod_repo, except cleanup