fixes SWC-1546 SWC-1547 and more