Bug fix, primitive deadlock implemented.