Fixed a fault in SDS.cpp