Fix for replacing whole video file not working properly