fix bug under PHP 5.3