Alignment crash fixes. I've sent this patch to Maxim, too.