Update worker.class.php

Fix for issue #957