Fix some bugs in motiontrackosc

A few bug fixes and cleanups