Added missing bracket.
Fixed possible deadlock