Issue #124 added isset to fix offset error