Fix when dom elements html, body and head already exists