fixed sms problem, and change the way to redirect.