Fixed wrong pbar length bug.