fixed multilevel array merge