Fix to Rtreedist