lots of fixes
apn fix