Fixed spurious array dimensions with temporary variables