Changed priority of 'wp_loaded' hook to 11, to allow p2p queries.