Intermediate commit for #714
Fixed some detected problems.
Authored by: numere 2022-06-28
Parent: [r1170]
Child: [r1172]