fix bug of ac-modes