fixes on worker code