Use safe_join for joining targets
Fix bug in worker.py