Resolved a problem with bp.js when changing tenant