fix for variables toggling their status when the user clicks away it