bug with sum