fixed a bunch of issues were the correct $sql wasn’t being called to get various names
fixed a an undefined variable in the performance query