fixed a segfault in kind of an ugly way but whatchagon'do
It was broken so I fixed it