MT#6523 merge changes from debian