Autopost fix as suggested by sudocat

This fixes the autopost functionality as suggested by sudocat on
wordpress.org -
http://wordpress.org/support/topic/auto-post-fix?replies=4