Merge for fixes of bnc#895359 and bnc#904527 into master