Keep previous queries open when deleting a query, and don't display two entries for time span