Fixed indexing bug in gaussian add