fix undefined index $sub
Merge pull request #168 from sumobi/develop

fix undefined index $sub