fixed for PHP5.3