bug fix. boundary fix. deal with root change