take in to account indexing fix on nd4j