Adding rotate matrix problem