added an error check for no pagination text