index thumbnail fix for gallery