Fixed an issue with self being used inside a block in a closure