a couple array fixes
fix a couple array handling bugs
more array fixes