Fix site switching bug