Fix BAP JS ref error.
Remove EOL whitespace
Land #4217, browser_autopwn variable fix