fix bug of macro