Corrected gallery to properly render the right amount of thumbs.