fix a bug in refresh animation