Various bug fixes than didn't happen on i386.

15 files changed