directory and index fix