fix bug about AF extension length, thanks for my colleague PAN Yang