fix bug when polling