Ia64 fixes

Should fix two of the issues reported by Jonas.