I think I need to watch out for 0d data after this. I will add a test for that.