Fix issue when selecting another resource