Small bug fixes in queryview method.