Fix for possible NPE; instead default to sensible values.