Basic fixes for range query processing.