Fixed a real deadlock