fixed a scope issue with self:: in a closure