On the extension of the frequency maps of the KdV and the KdV2 equations