Partial fix for #7: undefined property error