fixed typedeffing errors