Fix the bugs where a track doesn't exist

Signed-off-by: Tim Smart <tim@fostle.com>