fixes post-PHP 5.4 upgrade