Fixed doco
Fixed race condition