Fixed array passing bug