fixing bug when resize event happen