Fix mysqli database error and error library itself