OK i've done as Mathieu suggested and used the '-maxsize' to increase the capacity of the array to 1e+009. I have no idea what this means but the patch works so i'm not too bothered for now. Thanks for all the replies gentlemen.