Corrected bug for PHP 5.5