Bugfix: Saved by display

This is @jburel 's bugfix for the NPEs and ClassCastExceptions introduced with PR #2562 (which was already merged into develop).
Testing instructions same as for PR #2697 (same PR rebased to dev_5_0), see end of comments.