better cleaning up of worker and spawner proceses