Fix payload length calculation for Migrate/Ack msg

Also added a bunch of temporary debug messages.