Fixed bug on not checking for sudo once root is used.