fixed issue #91; thread running flag was not getting reset on unprovisioning