Prevented 2 errors from happening