fix on query optimizer.