fixed logic bugs
update should not set shape to OFF, if is already OFF
set should test the shape parameter instead of _shape which is not yet updated
used the wrong type to initalize event and the size for sendMessage in sendCommand