Fixed some errors concerning types