Fixed moronic null-pointer stuff.
Merge remote-tracking branch 'origin/master' into issue3