deadlock fix

and removing an unused constant