Fix regression introduced by fix for #72

Fixes potential `Notice:  Trying to get property of non-object`.