fixed pointer bug. This could result in an illegal memory access when the topology has more target then input dimensions