Ensure datatype is set when cropping.