Fixes to NDArray