Fix segfault
Fix big memory leak
Fix problem when use old rect for tracking in manual mode