Added module-locks where module threads are accessed.