Fix read/write race & slightly clean code
Bump version