fixing no node selected bug