Fix error in viewing previous query results