Fix critical bug in video writing