Multiple typing fixes