Correctly handle extended types