I've just noticed that calls to all monitor actions return two responses. The first response is of success, and the second is error saying "Invalid/unknown command". I'm looking at the code and I don't understand why this is happening. All my functions call astman_send_ack() and return 0 on success.