fix index flags