CRITICAL BUG fix: dynamic array initializing