Fix some threading issues