fixed outstanding array indexing bug in client