Fix document rootFrame margins apllying bug