Getting types right