Fixed an issue where unselectNode does not work because node is already removed

Fixed #131