Fixes to work with gnome3 (partially).