fix rewrite map loading