Fixed isLegacy() function