Fix usage of variable length array