fixed wrong array expansion