Fix and add an assert
Add tests that we don't remove errors for all supported ndim.