save last gallery added to for convienence; bug fix when editing galleries