Merged with changes in commit e27a9cc181426547319c4931434bd20834654ccd