Fixed a whooooole bunch of errors