some fixes for pidx writer