Fix notices during export

Notice: Trying to get property of non-object in /home/ess/public_html/wp-includes/general-template.php on line 1471
Merge pull request #57 from herewithme/patch-1

Fix notices during export