More race conditions. Should close #1
Merge branch 'dev'