Fixing bug in dataAttrbutes decoration due to race condition