Prevent access to undefined data
Merge pull request #1 from naag/master

Prevent access to undefined data