I tried saving an int value in bool by mistake and found out that it works when I set it using memset, Now I am not able to figure it out how it would actualy be possible.