A few fixes in SMS sending

Need to fix string termination problem