Fixed bug in gallery.php with saving from edititem form