minor bug fixes on apn server