forgot to set worker to null on end and wrap worker.terminate() in try-catch