Check for root and some minor fixes