set tail if needed in frame swap & cleanup