Fixed the resize issue