Fix #285. Remove mouseTrack only when one exists

Fixes #285