Get rid of undefined index on saving

Noticed some undefined index errors on saving.