fix test_U crash at dim=0