Change the SW.close etc commands to me.close.