Some HFA-related fixes