Some minor changes to comms.c