is 1000 a magic number somehow, or do you just try to make it as large as necessary? if the latter, please use resize at the place where you need it, and resize it to the correct size.