PHP 4.x compatible fix