Fixed pagination to not go below 0