Minor changes.
Merge remote-tracking branch 'origin/rollerball' into rollerball
Fixed potential race condition.