Gpu sum crash fix

reported by Chris Currivan on the mailing list.