clear the references of head tag