Fix refresh bug

Fixed the refresh bug