Fixed a bug with selecting.