Corrected endcondition for recursicve types