fix bug with PHP5.3.x