Fixed some weirdness with types