fix bug refresh page when resize window