Fixed issue affecting PHP 5.2/5.1