fix for local query