Fixed two bugs that could occur during concurrent data staging