Fix display sums when a query is loaded