Fix critical error in SMService