Fixed error in function SMS