Fixed some issues with the background process.