Squashed a few bugs. There were some catastrophic ones unfortunately. At least this one doesn't crash...