Fixed array dimension bug