Inherit the correct type