Merge pull request #458 from peihe/fixup-bq-diff

Forward port fixups in Beam PR-1032