Fix incorrect type in context constructors