Fixes to array matching