Fixed error with sum kernel