get the root directory correct