fixed case statement order in getNextIdFeatures, this also fixes type errors in the transformation result