Default window size bug fix

loadPreferences() now uses a default window size if the window dimension is 0. Fixes bug in Ubuntu 12.04 windows dimensions were 0 at point of loadPreferences.