kill middleware