bug fixes when saving video