fix "Notice: Undefined property error" see #115
Merge pull request #318 from mahmouds/patch-2

fix "Notice: Undefined property error" see #115