Fixed IP compare issue, it was caused by the signedness of java bytes. 174 was being treated as negative and was thus less than 54. That is why the tree was weird