fix bugs in container v2 and v3