Removing not working pagination code