fixed bug in detailgallerycontroller