fixed bug with "total" key name