back porting committs from master