Fix bug: Failed workunits were hanging on memory