fix unit tracking