Add in_loop var to ensure we're in a loop before allowing the site to be switched