Ajoe: fix some bugs for getting qclass

Signed-off-by: Bao Haojun <baohaojun@gmail.com>