Fix management command for retroactively billing sms to be more robust