fixed refresh bug