fixed cleanup of encoded media