fix bug: uninitialized array