fixed typos in typsystem, tests pass