fixed template 6 gallery issue