fixed read array problem