better legacy fix