prioritize bug fix.
broken tree are made by adding parent to wrong point