fixing issue with polling