slight tweaks to thread safety

Signed-off-by: Ted Young <tyoung@pivotallabs.com>