Fixed the bugs in the container apis