fix a bug in os_sms.c