fixing a bug with the poller.