Fix type for internal fields