Fixed errors in SoD check