Fixes several bugs with new tracking API.