fix a bunch of stupid errors