Fixed some bugs in the LID code so USB handsets work correctly.