fix arrays bug