Protect against updating the mode in chunks for in-memory container