fix some really bad mistakes (this was a pain)