This should be done but it segfaults

It's probably like an off by one error somewhere, so I'm just going to
go through it and figure it out.