fix to deadlocking problem on machines with 2 cores