Added more root checking.