Fixed an issue when working with sudo