fixed select/deselect bug and correct green/no-green after select/deselect