Fixed an issue with how  was being incorrectly passed into the closure.