fix zero array length and gir depends problem