before saving set first image as main
Merge pull request #32 from Neodelf/bugs

before saving set first image as main