Fixed bug of using  inside a clousure (needs to support PHP 5.3)