Fix availability toggle in global scope