Modified root directory resolution again