Rewrite maps as well