Adjust query dialog to correctly reflect existing values