fix for undefined doc.body (too fast run)