Fix access to array