fix untracking
more tweaks and tests