Fix gallery thumbnails