more deadlock fixes

fix c++ compile warnings