fixed inccorect references in arr()