refactoring to fix in Ubuntu GNOME 13.10 Shell 3.8.4