Fixed several bugs on resize and gnome classic.