Fixed an issue where clicking the current node would make the labels disappear. Also fixed a potential heisenbug and moved a function from the global space to the init function