Fixed bug in summout with pointers (created new variable) in for each
loop