still no clue why this throws the error document is null when createSafeFrag is called
--..--