Small patch - fixes the "Cannot destroy active lambda function" fatal