updated Resize() code to support 2B elements for TInt