Moved root check