fix some bugs and make track reader and track model more robust