Fix bug in gallery module
Fix bug in gallery module