get save working after rewrite