merge of 3.x into 3.1