Fixed error in PHP 5.2