Fixed some issues in #601 detected by the SW tests
Authored by: numere 2021-08-19
Parent: [r976]
Child: [r978]