Fix misc bugs

How did these even work before?