Sanity

Minor bugfix-ish things.