Fixed logic error on xml tree retrieval, I guess I put that there for a reason, whoops!