That did it thank you. I didn't expect it to consume a ridiculous amount of 9GB for a simple program. A more useful error message would be appreciated maybe throwing a outofmemory exception or something.