North Carolina lawmakers tweaked the controversial law known as House Bill 2 in the last hours of the state’s legislative session on Friday night, restoring the right to sue in state court for discriminatory firings.

Legislators approved the revision after months of harsh statewide and national criticism over the law, and repeated requests from Republican Gov. Pat McCrory to modify a section of the law that eliminated the right to action in state courts. Republican lawmakers on Friday night argued they were changing a section of the law because it has been misinterpreted.

"I haven't said that I think it was a mistake. I’m saying it was widely misreported," said Rep. Dan Bishop of Mecklenburg County, a key architect of HB2.

But Republican legislators ignored and left intact the best known and most widely decried section of the law, which requires transgender people to use bathrooms that correspond to the gender on their birth certificate. Even democrats who supported the update criticized it.

"We don't need to come out of here patting ourselves on the back with press conferences saying, 'We fixed something big on House Bill 2'," said Rep. Grier Martin, a Democrat from Wake County. "This was the lowest of the low hanging fruit. It does nothing to fix the core discrimination inherent to that bill."

He added: "I'm voting for it, but I ain't too happy about it."

Pressure to change the law has come from several quarters including the NBA, which has been considering whether to keep its 2017 All-Star Game in Charlotte. The league issued a joint statement late Thursday with the Charlotte Hornets, saying the changes would not meet their anti-discrimination standards.

The Human Rights Campaign issued a statement Friday saying that a full repeal of the law is the only acceptable solution.