bug fix for PHP v5.3