fixing bug in polling hooks