minor cleanup to a closure