Fix some type definitions