Fixed small bug where background worker prevents program from exiting.