Applied new callSync function instead of using mutexes in scope.