Fixing a whole bunch of bugs.