fix root conversion for compiling