Applied some fixes to implementation of ticket #588
Authored by: numere 2021-06-11
Parent: [r884]
Child: [r886]