fixing a bug where msg_complete would incorrectly increase the bytes read by one