Added checks for root