modifying dispatcher so that it doesn't die wholesale on PHP 5.2