Fix getPage support in Gallery snippet