Fixed WP build errors