Update code in Worker to be PHP 5.1 compatible