Changed registration and boundary_dist calculations