bug fix

fixed array bugs which prevented compilation