fixed bug with array-call-by-reference