fixing missing total values bug