fix. Avoid anonymous function error on PHP 5.2