Before the actual questioning begins, you're asked a series of questions that are obviously true or false to establish a baseline i.e. "Is your name ___?" "Do you live at ___?" "Are you a unicorn?" So your nervousness would be established as your baseline and any changes would register as a lie. Even with this, lie detector tests are so unreliable they're hardly used anymore.
If this is proven, then they should be done away with