Patched up a few bugs.