Whole bunch of emergency fixes.