Fix for blank screen at startup. (fixes #350)

This has been tested fully on OS X.

Build succeeds on Debian, but still have to test whether there's a blank window or not.

Fixes #350