adapt to new pb, small fixes