add idwithgalleryname option
some little bugs