Fixing Array vs Object access