fixes to !sw resolve #563