We propose a new method addressing the problem of template drift, a common phenomenon in which the target gradually shifts away from the template in object tracking. Much effort has been devoted to this problem, but the results are not satisfactory enough due to the lack of quantitative analysis of its cause. In this paper, after carefully examining where template drift stems from and how it influences template update, we derive expressions that accurately evaluate the model noises of the Kalman appearance filter employed to update the template. The appearance filter therefore achieves an optimal balance between reducing template drift and keeping track of target appearance variations. We perform experiments on a wide range of realworld video sequences containing diverse degrees of target appearance variations. All the experimental results confirm the effectiveness of our algorithm.