Fixed a closure issue