very minor edit
Worked around some null-pointer exceptions