changes from master 33dabc631aef271382641a3b03a17202f9bb2899