Remove unused condition in gallery