fixed linking problem in ROOTR and fixed some stuff