Fixes function for PHP 5.3.10