fixes for multi thread support