Fix some tracking bugs – this now works regardless of where the view is positioned.