Fix two bugs in clienthello processing