It sounds like you are mixing X10 and Insteon messages in the same program? My experience is that the PLM is not that smart about managing that.I have experiences where (I believe) the PLM sends the X10, but the insteon traffic on the network stomps on it. X10, being X10, can not recover from that.
An example is if you send an insteon message through the plm, your insteon network goes to work receiving and responding to those messages. Yet right behind the insteon scene message, the program requests an x10 message get sent. The PLM will go right ahead and send that x10 message, even as the other insteon devices are confirming their status. and you get no response from the x10 device
A way to check test this theory is to put a longer wait, eg 10 seconds to that keypad message and put x10 last as Lee indicated. If that works, back your way into a shorter time.