empty array not processed correctly