make container size a int for really big containers

fix for #4941 and #4918