Fixed resizesd bugs