Fix total bug