fix sm build