Fix errors from taking script from check_smart