AP Management Vlan wrong subnet mask?

Hello,

 There is a management vlan(99) and dhcp server in the router for AP and SM

Router --> switch --> AP epmp1000 --> SM epmp1000

I'm configuring both ports on switch as  trunk (tagged vlan 99). I see that AP and SM take ips from dhcp server. Although SM shows its gateway and subnet mask correctly, on the AP management interface i see its subnet mask different and there is no gateway address. 

Then I tried differently. I changed switch port which is through  AP as access. So i made its pvid 99. Then i erased my management vlan configurations on ePMPs(SM stays in seperate management vlan and there is no Management vlan id just takes its ip by dhcp). The result is not same as my first trial in terms of AP. Now it takes correct subnet mask and gateway. SM's ip, gateway and subnet mask are still correct.

Is that a bug or did i do something wrong somewhere?