fix for PHP4