fixed minor bug in matrix addition