fix webworker bugs