Fix error in total not being num