Not really sure what is causing it though, no exception is raised and the data is all valid, if I surround each code segment with try catch blocks it processes everything without the error, must be some wierd .net glitch.
Anyway, it works ok now, I will upload later today.