Cleaning picks from PR #612

details see PR #612