Fix normalize_dimensions bug introduced in previous commit