upload gallery, bugfix