fix bug in ad on rotate