fix a bug where the last tree node would not be returned in a find