Updated RTree.java

Script was crashing. Fixed bugs