selection bug fixes