Safari fix: replacing createTBody method call with pure javascript