Gallery : Fixed a zero-based index bug