fixed minor bug in background script