Lock on object rather than string