bug refresh infinite loop