Fixed resizesd bug