fixed minor bug of refresh (no update was happening)