fixed threading issues as described in ticket [ 1971514 ]