diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index c143a272101a3aec8c1e85ae2d0e9a6905c4c5d4..001c45e7a14b5c39e7dbfa452107fdf348c7adc3 100644
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -111,7 +111,7 @@ class LoginController extends Controller
                     Auth::login($user, true);
                 } else {
                     $username = $saml->getUsername();
-                    Log::error("SAML user '$username' could not be found in database.");
+                    \Log::warning("SAML user '$username' could not be found in database.");
                     $request->session()->flash('error', trans('auth/message.signin.error'));
                     $saml->clearData();
                 }
@@ -121,7 +121,7 @@ class LoginController extends Controller
                     $user->save();
                 }
             } catch (\Exception $e) {
-                Log::error("There was an error authenticating the SAML user: " . $e->getMessage());
+                \Log::warning("There was an error authenticating the SAML user: " . $e->getMessage());
                 throw new \Exception($e->getMessage());
             }
         }
diff --git a/app/Models/Company.php b/app/Models/Company.php
index e6bd3dd77328a7fb717516a331d5f859e48c3a05..04f138ccd0d6038d62a43adaab8306ed91029eb3 100644
--- a/app/Models/Company.php
+++ b/app/Models/Company.php
@@ -78,7 +78,7 @@ final class Company extends SnipeModel
             $company_id = null;
         }
 
-        $table = ($table_name) ? DB::getTablePrefix().$table_name."." : '';
+        $table = ($table_name) ? $table_name."." : '';
 
         if(\Schema::hasColumn($query->getModel()->getTable(), $column)){
              return $query->where($table.$column, '=', $company_id);