Fix bugs in js worker
Fix bug in protocol for python worker