added thead locking around flickr connection construction