minor fixes to background.js