Fixed 'TypeError: doc.body is undefined' on Scriptish