I would take him out earlier, perhaps around 6, and see if it makes a difference. He could be whining because he really needs to go.