Hopefully fix a few bugs.