Fix query interface