Minor tweaks

Tweaks to prevent WP warnings and reduce DB calls