Additional backports for Release 3.4.2

Backports of #679 and #678 for the the 3.4-stable branch.

@lukasgraf please have a look