Fixed some concurrency issues in comm module.
Merge pull request #10 from puneet/master

Fixed some concurrency issues in comm module.