Make sure capacity gets transformed to an int rather than a long