Fix #59

`$rootElement` might be the body itself, this is safer.