Fixes data race