Pushed mutex waiting fix to main codebase