Corrected an error with mixed dimensions.