Fix issues with directories