squareString not updating after merge operation fix