changing canavs group alpha from 0 to 1 and back

I have a menu that you can set controls from when you hit the escape button. I also have a menu where you can choose between spells in the game by using the E key. So I set a method that takes in a canvas group object and then sets the alpha of said canvas group to 1 if its 0 and 0 if its 1.

It works fine when I hit the esc key but when pressing the E key it changes to 1 but never changes back.
Any suggestion

113249-capture.png

this is how im calling it for both:
Esc
113251-esc.png

for spells in stead of UIManager.Instance.Controls
its
UIManager.Instance.Spells

Ive just spotted it haha silly mistake, forgot to change the canvas group controls to canvasGroup variable