Fix #539 - Detach video tag before modifying it