Fix some crashes and added apn_feedback check.