Fix metas sync when creating connections programmatically.
Removed unused $wpdb global