fix gallery media dialog paging bug