fix loading a directory