fixes bug in sms controller