Rewrite index fix #2