Fix fragment mode - still hacky, treats everything as if in <body>.