Fixed some more stupid typos and type-checking errors