fixed auto assignment of Sort IDs to use Static variables