Backport/511

Backport of #511
It is a backport for Juno/Kepler only.