Fix issue when trying to set the download directory