Fixing data race introduced by latest changes