Array Access bug

Fixing issue with accessing array values.