Fixed loops

Fixed the loops. Merging power-of-2 arrays and odd arrays works.