Fix bugs in convertion of boost output to unary potentials