Fix the SMS and email functions