get rid of undefined index on saving
Merge pull request #8 from syamilmj/master

Get rid of undefined index on saving