fixed freeze browser when resize