Fix for removing unwanted body and head tags