Fixed some more bugs with selection changing.