Fix memory leak (also delete the best model).