Made gallery images transition more smoothly