Several bug fixes, especially for AArch64.