Fixes bug with refresh.