Fixing range and queries