fix distance inheritance