added minor fix for when running from wp-cli