fix account sum logic