fixed glitches

Found a missing paranthesees with an old  $wpdb->prepare I didn't write
which was causing issues and made it so newlogs is actually a PHP
variable.