Fix bug in gallery mobile