Avoided a possible dead lock.