Fix for null-pointer exception following the fix for PR#233