Wip 8113

This branch fixes #8113 and #8175 and should be backported to firefly.