Fix a bug in APN