Fix bug in PHP 5.4