Release pending items on exception
Merge pull request #643 from hultqvist/upstream

Release pending items on exception