Added boolean to prevent infinite error messages for the client