fixed random segfault, I think. Also silly error in covering a variable and converted a lot of tabs.