make writeExecutePacket independent of number of arguments

Should fix #201 and #209