bug in location of output arrays init