video: merged @RaymondP's changes