added kinda janky polyfill fix for pagination