replicating changes from J.M.Cantera's commit 2e4787dc65 to SMS API