Add race detection (not tested yet)