really fix race conditions

Submitted by: "Patrick McCormick" <patrick@tellme.com>

PR: 262
PR: 291
11 files changed