Fixed array bug, now using vector