fix tracker logic