Fix query in predb.