fixing problem with inbox refresh loop