fixed nullpointerexception on treeset