bugfix, may lead to Waiting for table metadata lock error