mlt thread handles app closing down better